package com.mxprojects.io
{
	import flash.events.Event;
	
	public class CustomEvent extends Event
	{
		public var customParameter:*;
		
		/*************************************************************
		 * Simple useage. Pass the name of the event you want to fire 
		 * and any parameters that need to be sent 
		 ************************************************************/
		
		public function CustomEvent(type:String, ...parms:*){
			//save the arguments
			customParameter = parms;
			
			//call the super()
			super(type, false, false);
		}
		
		//if you just want the server data
		public function getServerData():Object {
			return customParameter[0];
		}
		
		//gotta override the clone
		override public function clone():Event {
			return new CustomEvent(type, bubbles, cancelable, customParameter);
		}
		
	}
}